package com.samebuilding.service.impl;

import java.util.List;

import com.samebuilding.dao.UserVisitDAO;
import com.samebuilding.domain.UserVisit;
import com.samebuilding.service.UserVisitService;

public class UserVisitServiceImpl implements UserVisitService {

	private UserVisitDAO userVisitDAO;
	
	public UserVisitDAO getUserVisitDAO() {
		return userVisitDAO;
	}

	public void setUserVisitDAO(UserVisitDAO userVisitDAO) {
		this.userVisitDAO = userVisitDAO;
	}

	
	public void addUserVisit(UserVisit userVisit) {
		this.userVisitDAO.save(userVisit);

	}

	public void deleteByUidAndVisitUid(Integer visitUserNo,
			Integer visitedUserNo) {
		this.userVisitDAO.deleteByUidAndVisitUid(visitUserNo, visitedUserNo);

	}

	public int getCountIvisitWho(Integer visitUserNo) {
		
		return this.userVisitDAO.getCountIvisitWho(visitUserNo);
	}

	public int getCountWhoVisitI(Integer visitedUserNo) {
		
		return this.userVisitDAO.getCountWhoVisitI(visitedUserNo);
	}

	public List<UserVisit> getIVisitWho(Integer visitUserNo, int start,
			int limit) {
		
		return this.userVisitDAO.getIVisitWho(visitUserNo, start, limit);
	}

	public List<UserVisit> getWhoVisitI(Integer visitedUserNo, int start,
			int limit) {
		
		return this.userVisitDAO.getWhoVisitI(visitedUserNo, start, limit);
	}

}
